const jwt = require('jwt-simple')

const KEY = 'for(let i=0;i<10000;i++){console.log(iloveyou)}'

const payload = {adminName:'atguigu',exp:Date.now()/1000 + 60*60*24*15}
const token = jwt.encode(payload,KEY)

console.log(token)// jwt描述对象.payload.无法解码
//eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhZG1pbk5hbWUiOiJhdGd1aWd1In0.2jHkssV-c7ytz0Gqstg3HgdHFFkxR0AJHJhknaM_v-c

setTimeout(()=>{
    try{
        console.log(jwt.decode(token,KEY))
    }catch(e){
        console.log(e.message)
    }
},6000)